package com.ccnf.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("expo")
public class Expo extends Model<Expo> {
    @ApiModelProperty(value = "展会ID")
    @TableId("expo_id")
    private Long expoId;
    @TableField("expo_name")
    private String expoName;
    @ApiModelProperty("开始日期(请按照格式 yyyy-MM-dd 传递)")
    @TableField("start_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date startDate;
    @ApiModelProperty("结束日期(请按照格式 yyyy-MM-dd 传递)")
    @TableField("end_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date endDate;
    @TableField("channel_code")
    private String channelCode;
    @TableField("register_url")
    private String registerUrl;
    @TableField("expo_code")
    private String expoCode;

    @Override
    protected Serializable pkVal() {
        return expoId;
    }
}